<div>
  <form nz-form [formGroup]="validateForm">
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>计划名称</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
        <nz-input [(ngModel)]="tpBean.planName" formControlName="planName" name="planName"></nz-input>
        <div nz-form-explain *ngIf="getFormControl('planName').dirty&&getFormControl('planName').hasError('required')">计划名称不能为空!</div>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>计划类型</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
        <nz-select  [(ngModel)]="tpBean.planType" formControlName="planType" name="planType" [nzPlaceHolder]="'请选择'" [nzSize]="'large'" [nzShowSearch]="true">
          <nz-option *ngFor="let item of config.TRAINING_TYPE" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
        </nz-select>
        <div nz-form-explain *ngIf="getFormControl('planType').dirty&&getFormControl('planType').hasError('required')">计划类型不能为空!</div>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>计划内容描述</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
        <nz-input [(ngModel)]="tpBean.planContent" [nzType]="'textarea'" [nzRows]="'5'"  formControlName="planContent" name="planContent"></nz-input>
        <div nz-form-explain *ngIf="getFormControl('planContent').dirty&&getFormControl('planContent').hasError('required')">计划内容描述不能为空!</div>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>牵头单位</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
        <nz-input [(ngModel)]="tpBean.leadUnitName" [nzDisabled]="true" formControlName="leadUnitName" name="leadUnitName"></nz-input>
        <div nz-form-explain *ngIf="getFormControl('leadUnitName').dirty&&getFormControl('leadUnitName').hasError('required')">牵头单位描述不能为空!</div>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>负责人</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
        <nz-input [(ngModel)]="tpBean.userName" formControlName="userName" name="userName"></nz-input>
        <div nz-form-explain *ngIf="getFormControl('userName').dirty&&getFormControl('userName').hasError('required')">负责人不能为空!</div>
      </div>
    </div>

    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSpan]="6">
        <label nz-form-item-required>实施时间</label>
      </div>
      <div nz-form-control nz-col [nzSpan]="18" nzHasFeedback>
        <nz-datepicker [nzSize]="'large'" [nzFormat]="'YYYY-MM-DD'" formControlName="startDate" name="startDate" [nzPlaceHolder]="'开始日期'" [(ngModel)]="tpBean.startDate"></nz-datepicker>
        至
        <nz-datepicker [nzSize]="'large'" [nzFormat]="'YYYY-MM-DD'" formControlName="endDate" name="endDate" [nzPlaceHolder]="'结束日期'" [(ngModel)]="tpBean.endDate"></nz-datepicker>
      </div>

    </div>
    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="4" [nzOffset]="8">
        <button nz-button class="login-form-button" [nzType]="'primary'" [nzSize]="'large'" (click)="submitForm()">添加</button>
      </div>
      <div nz-form-control nz-col [nzSpan]="2">
        <button nz-button class="login-form-button" [nzType]="'primary'" [nzSize]="'large'" (click)="quit()">取消</button>
      </div>
    </div>
  </form>
</div>
